# -*- coding:utf-8 -*-
"""
@Time : 2025/01/17 07:06 AM
@Author: xiaomi
@Des: schemas模型
"""
from datetime import datetime
from pydantic import Field, BaseModel, field_validator
from typing import Optional, List, Tuple, Union
from schemas.base import BaseResp, ResAntTable


class UpdatePageReq(BaseModel):
    cate_id: int
    content: str

class AddNewsReq(BaseModel):
    title: str
    content: str
    cate_id: int
    sort: int = 0
    istop: int = 0
    isnice: int = 0
    islock: int = 0
    ispic: int = 0

class UpdateNewsReq(BaseModel):
    id: int
    title: str
    pic: Optional[str] = None
    content: str
    cate_id: int
    sort: int = 0
    istop: int = 0
    isnice: int = 0
    islock: int = 0
    ispic: int = 0

class AddProReq(BaseModel):
    title: str
    content: Optional[str] = None
    cate_id: int
    piclist: Optional[str] = None
    pic: Optional[str] = None
    price: Optional[float] = 0.00
    sort: int = 0
    istop: int = 0
    isnice: int = 0
    islock: int = 0
    ispic: int = 0

class UpdateProReq(BaseModel):
    id: int
    title: str
    content: Optional[str] = None
    cate_id: int
    piclist: Optional[str] = None
    pic: Optional[str] = None
    price: Optional[float] = 0.00
    sort: int = 0
    istop: int = 0
    isnice: int = 0
    islock: int = 0
    ispic: int = 0